package good.threadlocalDemo.small;

public class Demo {

	public static void main(String[] args) {
		Student sudent=new Student();
		sudent.setAge(222);
		ThreadLocal tl=new ThreadLocal();
		Student st=(Student)tl.get();
		if(st==null){
			tl.set(sudent);
		}
		new Demo().ttt();
	}
	private  void ttt(){
		ThreadLocal tl=new ThreadLocal();
		Student stt=(Student)tl.get();
		System.out.println(stt.getAge());
		
	}

}
